home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
dev
/
lang
/
pcq12b.lzh
/
Include
/
Devices
/
Timer.i
< prev
next >
Wrap
Text File
|
1991-03-27
|
1KB
|
61 lines
{
Timer.i for PCQ Pascal
}
{$I "Include:Exec/IO.i"}
Const
{ unit defintions }
UNIT_MICROHZ = 0;
UNIT_VBLANK = 1;
TIMERNAME = "timer.device";
Type
timeval = record
tv_secs : Integer;
tv_micro : Integer;
end;
timevalPtr = ^timeval;
timerequest = record
tr_node : IORequest;
tr_time : timeval;
end;
timerequestPtr = ^timerequest;
Const
{ IO_COMMAND to use for adding a timer }
TR_ADDREQUEST = CMD_NONSTD;
TR_GETSYSTIME = CMD_NONSTD + 1;
TR_SETSYSTIME = CMD_NONSTD + 2;
{ To use any of the routines below, TimerBase must be set to point
to the timer.device, either by calling CreateTimer or by pulling
the device pointer from a valid TimeRequest, i.e.
TimerBase := TimeRequest.io_Device;
_after_ you have called OpenDevice on the timer.
}
var
TimerBase : Address;
{ Dest := Dest + Source }
Procedure AddTime(VAR Dest, Source : TimeVal);
External;
Function CmpTime(VAR Dest, Source : TimeVal) : Integer;
External;
{ Dest := Dest - Source }
Procedure SubTime(VAR Dest, Source : TimeVal);
External;